<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title>004弹出式菜单</title>
        <style type="text/css">
            ul.nav {
                list-style: none;
                display: inline-block;
                /*这里需要设置高度，否则子元素的float会导致高度坍塌*/
                height: 30px;
            }

            ul.nav>li {
                float: left;
                display: block;
                width: 50px;
                height: 100%;
                background-color: yellowgreen;
                line-height: 30px;
                text-align: center;
                border: 1px solid gray;
                cursor: pointer;
            }

            ul.nav>li:hover {
                background-color: gray;
            }

            ul.nav>li:hover .drop-down-content {
                display: inherit;
            }

            .drop-down-content {
                /*显示在仙界，足够高*/
                position: relative;
                display: none;
                list-style: none;
                width: 100%;
                padding: 0;
                background-color: gray;
                border: 1px solid gray;
            }

            .drop-down-content a:link, .drop-down-content a:visited, .drop-down-content a:hover, .drop-down-content a:active {
                display: block;
                padding: 1px;
                border: 1px solid gray;
                color: green;
            }

            .drop-down-content a {
                text-decoration: none;
            }

            .drop-down-content>li {
                display: block;
            }

            .drop-down-content>li:hover {
                display: block;
                background-color: yellowgreen;
            }
        </style>
    </head>
    <body>
        <ul class="nav">
            <li>
                <span>AAA</span>
                <ul class="drop-down-content">
                    <li>
                        <a href="#">A</a>
                    </li>
                    <li>
                        <a href="#">B</a>
                    </li>
                    <li>
                        <a href="#">C</a>
                    </li>
                </ul>
                <span>@@@@@@@@@@@@@@@@@@@</span>
            </li>
            <li>BBB</li>
            <li>AAA</li>
            <li>AAA</li>
            <span>QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ</span>
            <span>QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ</span>
            <span>QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ</span>
        </ul>
        <span>hahhaha</span>
        <span>hahhaha</span>
        <span>hahhaha</span>
        <span>hahhaha</span>
        <span>hahhaha</span>
        <span>hahhaha</span>
        <span>hahhaha</span>
        <span>hahhaha</span>
        <span>hahhaha</span>
        <span>hahhaha</span>
        <span>hahhaha</span>
        <span>hahhaha</span>
        <span>hahhaha</span>
        <span>hahhaha</span>
        <span>hahhaha</span>
        <span>hahhaha</span>
        <span>hahhaha</span>
        <span>hahhaha</span>
        <span>hahhaha</span>
        <span>hahhaha</span>
        <span>hahhaha</span>
        <span>hahhaha</span>
        <span>hahhaha</span>
        <span>hahhaha</span>
        <span>hahhaha</span>
        <span>hahhaha</span>
        <span>hahhaha</span>
        <span>hahhaha</span>
        <span>hahhaha</span>
        <span>hahhaha</span>
        <span>hahhaha</span>
        <span>hahhaha</span>
        <span>hahhaha</span>
        <span>hahhaha</span>
        <span>hahhaha</span>
        <span>hahhaha</span>
        <span>hahhaha</span>
        <span>hahhaha</span>
        <span>hahhaha</span>
        <span>hahhaha</span>
        <span>hahhaha</span>
        <span>hahhaha</span>
        <span>hahhaha</span>
        <span>hahhaha</span>
        <span>hahhaha</span>
        <span>hahhaha</span>
        <span>hahhaha</span>
        <span>hahhaha</span>
        <span>hahhaha</span>
        <span>hahhaha</span>
        <span>hahhaha</span>
        <span>hahhaha</span>
        <span>hahhaha</span>
        <span>hahhaha</span>
        <span>hahhaha</span>
        <span>hahhaha</span>
        <span>hahhaha</span>
        <span>hahhaha</span>
        <span>hahhaha</span>
        <hr/>
    </body>
</html>
